<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    input {
      width: 200px;
      height: 15px;
      transition: all 2s;
    }

    /* focus伪类选择器  获得焦点时触发 */
    input:focus {
      width: 400px;
      height: 100px;
    }
  </style>
</head>

<body>
  <input type="text">
</body>

</html>